package com.qcby.byc.demo0422.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @className: Person
 * @description:
 * @author: lxt
 * @create: 2021-04-22 17:12
 **/
public class Person {

    private Long id;
    private String name;
    private Long departId;
    // 该字段不映射数据库字段，只用于参数传递
    @TableField(exist = false)
    private Depart depart;
    // 该字段不映射数据库字段，只用于参数传递
    @TableField(exist = false)
    private String departName;
    /**
     * 部门创建时间，由前台传入
     */
    // 格式化传入参数的时间格式
//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    // 2021-04-20 10:00:00
    // 格式化返回给前台时间参数的格式
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    // 该字段不映射数据库字段，只用于参数传递
    @TableField(exist = false)
    private LocalDateTime createTime;
    /**
     * 0 男 1  女
     */
    private int sex;


    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getDepartName() {
        return departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    public Depart getDepart() {
        return depart;
    }

    public void setDepart(Depart depart) {
        this.depart = depart;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getDepartId() {
        return departId;
    }

    public void setDepartId(Long departId) {
        this.departId = departId;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }


}
